package com.easy.neo4j.entry.bus;

import lombok.Data;
import org.springframework.data.neo4j.core.schema.GeneratedValue;
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Property;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Objects;

/**
 * @author: CoolPro
 * @Desc: 车站
 * @create: 2024-02-26 19:13
 **/
@Node(labels = "BusSite")
@Data
public class SiteReader implements Serializable {
    //    private static final long serialVersionUID = 40L;

    @Id
    @GeneratedValue
    private Long id;

    @Property
    private int Line_Type;
    @Property
    private String[] Line_Id;
    @Property
    private String Station_Id;
    @Property
    private String Station_Name;
    @Property
    private int Sort;
    @Property
    private String[] LatLng;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SiteReader that = (SiteReader) o;
        return Line_Type == that.Line_Type && Sort == that.Sort && Objects.equals(id, that.id) && Arrays.equals(Line_Id, that.Line_Id) && Objects.equals(Station_Id, that.Station_Id) && Objects.equals(Station_Name, that.Station_Name) && Arrays.equals(LatLng, that.LatLng);
    }

    @Override
    public int hashCode() {
        int result = Objects.hash(id, Line_Type, Station_Id, Station_Name, Sort);
        result = 31 * result + Arrays.hashCode(Line_Id);
        result = 31 * result + Arrays.hashCode(LatLng);
        return result;
    }

    @Override
    public String toString() {
        return "Site{" +
                "Line_Type=" + Line_Type +
                ", Line_Id=" +Line_Id +
                ", Station_Id='" + Station_Id + '\'' +
                ", Station_Name='" + Station_Name + '\'' +
                ", Sort=" + Sort +
                ", LatLng=" + LatLng +
                '}';
    }


}
